@import 'shared';

@media print {
  // Pure black text.
  body, a, code {
    color: #000 !important;
    background: none !important;
  }

  // Hide non-content stuff.
  nav, .sign-up {
    display: none;
  }

  // Get rid of extra margins. The page margin will handle this.
  .page {
    margin: 0 !important;
  }

  // Tweak how code is formatted since we don't want to use a background color.
  .codehilite {
    pre {
      color: #000 !important;
    }

    margin: 0 !important;

    // Borders above and below and no background.
    background: none !important;
    border-radius: 0 !important;
    border-left: solid 1px $warm-4;
    border-right: solid 1px $warm-4;

    // Show thicker borders on the left and right instead of a background.
    .insert {
      border-left: solid 3px $warm-4 !important;
      border-right: solid 3px $warm-4 !important;
      background: none !important;
    }

    .delete {
      -webkit-print-color-adjust: exact;
      color-adjust: exact;
    }

    // Browsers don't honor the specific authored colors when printing if the
    // color is too close the background. Tell the browser not to do that.
    .insert-before span, .insert-after span {
      -webkit-print-color-adjust: exact;
      color-adjust: exact;
    }
  }
}
